package com.lrkj.waitress.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lrkj.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 房屋业主关系对象 tr_room_custom
 *
 * @author yajun_ren
 * @date 2022-03-17
 */
@Data
public class RoomCustom extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 房屋ID
     */
    private String roomId;

    /**
     * 业主ID
     */
    private String customId;

    /**
     * 关系类别
     */
    private String relationType;

    /**
     * 业主类型
     */
    private String ownerType;

    //是否认证
    private String wrVerify;

    //是否默认
    private String wrDefault;

    //客户名称
    private String customName;
    //客户联系方式
    private String cellPhoneNumber;
    //身份证号
    private String idCard;

    //房屋名称
    private String roomName;
    //建筑面积
    private String buildArea;
    //使用面积
    private String roomArea;
    //住所户型
    private String apartment;
    //房屋功能
    private String roomFunction;

    //小区ID
    private String communityId;

    //小区名称
    private String communityName;

    private String appUserId;

    //入伙时间时间
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date joinTime;

    //过滤关系类型, 小程序端要用到
    private String neRelationType;


    public RoomCustom() {
    }

    public RoomCustom(String roomId, String customId, String relationType, String ownerType) {
        this.roomId = roomId;
        this.customId = customId;
        this.relationType = relationType;
        this.ownerType = ownerType;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("roomId", getRoomId())
                .append("customId", getCustomId())
                .append("relationType", getRelationType())
                .append("ownerType", getOwnerType())
                .toString();
    }
}
